package com.blackhorse.order.feign;

import com.blackhorse.order.entity.Product;
import org.springframework.stereotype.Component;

@Component //需要把实现类放入IOC容器
public class ProductFeignClientCallBack implements ProductFeignClient {
    //熔断降级的方法
    @Override
    public Product getProductByFeign(Long id) {
        Product product = new Product();
        product.setProductName("商品服务繁忙，请稍后再试...");
        return product;
    }
}
